<?php
include('phpgraphlib/phpgraphlib.php');


//$datae=$_GET['data']; 

$graph = new PHPGraphLib(1200,450);

for($i=1;$i<=28;$i++){
    
     $datae[$_GET["data$i"]] = $_GET["engagement$i"];
    
}


$graph->addData($datae);

$graph->setTitle('Engagement for last 28 days');

$graph->setBars(false);
$graph->setLine(true);

$graph->setDataPoints(true);

$graph->setDataPointColor('blue');
$graph->setDataValues(true);

$graph->setDataValueColor('blue');

$graph->setGoalLine(50);
$graph->setGoalLineColor('red');

$graph->createGraph();

?>